<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./../template.xhtml">

            <ui:define name="title">
                title
            </ui:define>

            <ui:define name="title">
                title
            </ui:define>

            <ui:define name="body">
                <f:view>
                    <h:form id="login">
                        <table width="100%" cellspacing="5">

                            <tr>
                                <td></td>
                                <td height="30">&nbsp;</td>
                            </tr>

                            <tr>
                                <td nowrap="nowrap">&nbsp;Email
                                    :</td>
                                <td><h:inputText id="email" 
                                                 value="#{userManager.email}"/></td>
                            </tr>
                            <tr>
                                <td>&nbsp;Password
                                    :</td>
                                <td><h:inputSecret id="password"
                                                   value="#{userManager.password}"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2"><div align="right"><h:commandButton id="submit" 
                                                                                    type="submit"
                                                                                    value="Login"
                                                                                    action="#{userManager.login()}"/>&nbsp;&nbsp;
                                        <h:commandLink id="create"
                                                       value="Create New Account"
                                                       action="Register"/></div></td>
                            </tr>
                            <tr>
                                <td colspan="2">        
                                    <h:panelGroup id="messagePanel" layout="block">
                                        <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                                    </h:panelGroup>
                                </td>
                            </tr>
                        </table>
                    </h:form>
                </f:view>
            </ui:define>
        </ui:composition>
    </body>
</html>
